package com.zhonghui.modlules.product.eshopVo;

import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;

@ApiModel(
        value = "YxStoreProductReplyQueryVo对象",
        description = "评论表查询参数"
)
public class StoreProductReplyQueryVo implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("评论ID")
    private Long id;
    @ApiModelProperty("产品id")
    private Long productId;
    @ApiModelProperty("某种商品类型(普通商品、秒杀商品）")
    private String replyType;
    @ApiModelProperty("商品分数")
    private Integer productScore;
    @ApiModelProperty("服务分数")
    private Integer serviceScore;
    @ApiModelProperty("评论内容")
    private String comment;
    @ApiModelProperty("评论图片")
    private String[] pics;
    private String pictures;
    private String[] picturesArr;
    @ApiModelProperty("管理员回复内容")
    private String merchantReplyContent;
    @ApiModelProperty("管理员回复时间")
    private Date merchantReplyTime;
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date createTime;
    @ApiModelProperty("评价星星数")
    private String star;
    @ApiModelProperty("用户昵称")
    private String nickname;
    @ApiModelProperty("用户头像")
    private String avatar;
    @ApiModelProperty("商品sku")
    private String sku;
    @JsonIgnore
    private String cartInfo;

    public String[] getPicturesArr() {
        return StrUtil.isNotEmpty(this.pictures) ? this.pictures.split(",") : new String[0];
    }

    public StoreProductReplyQueryVo() {
    }

    public Long getId() {
        return this.id;
    }

    public Long getProductId() {
        return this.productId;
    }

    public String getReplyType() {
        return this.replyType;
    }

    public Integer getProductScore() {
        return this.productScore;
    }

    public Integer getServiceScore() {
        return this.serviceScore;
    }

    public String getComment() {
        return this.comment;
    }

    public String[] getPics() {
        return this.pics;
    }

    public String getPictures() {
        return this.pictures;
    }

    public String getMerchantReplyContent() {
        return this.merchantReplyContent;
    }

    public Date getMerchantReplyTime() {
        return this.merchantReplyTime;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public String getStar() {
        return this.star;
    }

    public String getNickname() {
        return this.nickname;
    }

    public String getAvatar() {
        return this.avatar;
    }

    public String getSku() {
        return this.sku;
    }

    public String getCartInfo() {
        return this.cartInfo;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setProductId(final Long productId) {
        this.productId = productId;
    }

    public void setReplyType(final String replyType) {
        this.replyType = replyType;
    }

    public void setProductScore(final Integer productScore) {
        this.productScore = productScore;
    }

    public void setServiceScore(final Integer serviceScore) {
        this.serviceScore = serviceScore;
    }

    public void setComment(final String comment) {
        this.comment = comment;
    }

    public void setPics(final String[] pics) {
        this.pics = pics;
    }

    public void setPictures(final String pictures) {
        this.pictures = pictures;
    }

    public void setPicturesArr(final String[] picturesArr) {
        this.picturesArr = picturesArr;
    }

    public void setMerchantReplyContent(final String merchantReplyContent) {
        this.merchantReplyContent = merchantReplyContent;
    }

    public void setMerchantReplyTime(final Date merchantReplyTime) {
        this.merchantReplyTime = merchantReplyTime;
    }

    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    public void setCreateTime(final Date createTime) {
        this.createTime = createTime;
    }

    public void setStar(final String star) {
        this.star = star;
    }

    public void setNickname(final String nickname) {
        this.nickname = nickname;
    }

    public void setAvatar(final String avatar) {
        this.avatar = avatar;
    }

    public void setSku(final String sku) {
        this.sku = sku;
    }

    @JsonIgnore
    public void setCartInfo(final String cartInfo) {
        this.cartInfo = cartInfo;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof StoreProductReplyQueryVo)) {
            return false;
        } else {
            StoreProductReplyQueryVo other = (StoreProductReplyQueryVo)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label199: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label199;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label199;
                    }

                    return false;
                }

                Object this$productId = this.getProductId();
                Object other$productId = other.getProductId();
                if (this$productId == null) {
                    if (other$productId != null) {
                        return false;
                    }
                } else if (!this$productId.equals(other$productId)) {
                    return false;
                }

                label185: {
                    Object this$productScore = this.getProductScore();
                    Object other$productScore = other.getProductScore();
                    if (this$productScore == null) {
                        if (other$productScore == null) {
                            break label185;
                        }
                    } else if (this$productScore.equals(other$productScore)) {
                        break label185;
                    }

                    return false;
                }

                Object this$serviceScore = this.getServiceScore();
                Object other$serviceScore = other.getServiceScore();
                if (this$serviceScore == null) {
                    if (other$serviceScore != null) {
                        return false;
                    }
                } else if (!this$serviceScore.equals(other$serviceScore)) {
                    return false;
                }

                label171: {
                    Object this$replyType = this.getReplyType();
                    Object other$replyType = other.getReplyType();
                    if (this$replyType == null) {
                        if (other$replyType == null) {
                            break label171;
                        }
                    } else if (this$replyType.equals(other$replyType)) {
                        break label171;
                    }

                    return false;
                }

                Object this$comment = this.getComment();
                Object other$comment = other.getComment();
                if (this$comment == null) {
                    if (other$comment != null) {
                        return false;
                    }
                } else if (!this$comment.equals(other$comment)) {
                    return false;
                }

                if (!Arrays.deepEquals(this.getPics(), other.getPics())) {
                    return false;
                } else {
                    label156: {
                        Object this$pictures = this.getPictures();
                        Object other$pictures = other.getPictures();
                        if (this$pictures == null) {
                            if (other$pictures == null) {
                                break label156;
                            }
                        } else if (this$pictures.equals(other$pictures)) {
                            break label156;
                        }

                        return false;
                    }

                    if (!Arrays.deepEquals(this.getPicturesArr(), other.getPicturesArr())) {
                        return false;
                    } else {
                        Object this$merchantReplyContent = this.getMerchantReplyContent();
                        Object other$merchantReplyContent = other.getMerchantReplyContent();
                        if (this$merchantReplyContent == null) {
                            if (other$merchantReplyContent != null) {
                                return false;
                            }
                        } else if (!this$merchantReplyContent.equals(other$merchantReplyContent)) {
                            return false;
                        }

                        label141: {
                            Object this$merchantReplyTime = this.getMerchantReplyTime();
                            Object other$merchantReplyTime = other.getMerchantReplyTime();
                            if (this$merchantReplyTime == null) {
                                if (other$merchantReplyTime == null) {
                                    break label141;
                                }
                            } else if (this$merchantReplyTime.equals(other$merchantReplyTime)) {
                                break label141;
                            }

                            return false;
                        }

                        label134: {
                            Object this$createTime = this.getCreateTime();
                            Object other$createTime = other.getCreateTime();
                            if (this$createTime == null) {
                                if (other$createTime == null) {
                                    break label134;
                                }
                            } else if (this$createTime.equals(other$createTime)) {
                                break label134;
                            }

                            return false;
                        }

                        Object this$star = this.getStar();
                        Object other$star = other.getStar();
                        if (this$star == null) {
                            if (other$star != null) {
                                return false;
                            }
                        } else if (!this$star.equals(other$star)) {
                            return false;
                        }

                        label120: {
                            Object this$nickname = this.getNickname();
                            Object other$nickname = other.getNickname();
                            if (this$nickname == null) {
                                if (other$nickname == null) {
                                    break label120;
                                }
                            } else if (this$nickname.equals(other$nickname)) {
                                break label120;
                            }

                            return false;
                        }

                        Object this$avatar = this.getAvatar();
                        Object other$avatar = other.getAvatar();
                        if (this$avatar == null) {
                            if (other$avatar != null) {
                                return false;
                            }
                        } else if (!this$avatar.equals(other$avatar)) {
                            return false;
                        }

                        Object this$sku = this.getSku();
                        Object other$sku = other.getSku();
                        if (this$sku == null) {
                            if (other$sku != null) {
                                return false;
                            }
                        } else if (!this$sku.equals(other$sku)) {
                            return false;
                        }

                        Object this$cartInfo = this.getCartInfo();
                        Object other$cartInfo = other.getCartInfo();
                        if (this$cartInfo == null) {
                            if (other$cartInfo != null) {
                                return false;
                            }
                        } else if (!this$cartInfo.equals(other$cartInfo)) {
                            return false;
                        }

                        return true;
                    }
                }
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof StoreProductReplyQueryVo;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $productId = this.getProductId();
        result = result * 59 + ($productId == null ? 43 : $productId.hashCode());
        Object $productScore = this.getProductScore();
        result = result * 59 + ($productScore == null ? 43 : $productScore.hashCode());
        Object $serviceScore = this.getServiceScore();
        result = result * 59 + ($serviceScore == null ? 43 : $serviceScore.hashCode());
        Object $replyType = this.getReplyType();
        result = result * 59 + ($replyType == null ? 43 : $replyType.hashCode());
        Object $comment = this.getComment();
        result = result * 59 + ($comment == null ? 43 : $comment.hashCode());
        result = result * 59 + Arrays.deepHashCode(this.getPics());
        Object $pictures = this.getPictures();
        result = result * 59 + ($pictures == null ? 43 : $pictures.hashCode());
        result = result * 59 + Arrays.deepHashCode(this.getPicturesArr());
        Object $merchantReplyContent = this.getMerchantReplyContent();
        result = result * 59 + ($merchantReplyContent == null ? 43 : $merchantReplyContent.hashCode());
        Object $merchantReplyTime = this.getMerchantReplyTime();
        result = result * 59 + ($merchantReplyTime == null ? 43 : $merchantReplyTime.hashCode());
        Object $createTime = this.getCreateTime();
        result = result * 59 + ($createTime == null ? 43 : $createTime.hashCode());
        Object $star = this.getStar();
        result = result * 59 + ($star == null ? 43 : $star.hashCode());
        Object $nickname = this.getNickname();
        result = result * 59 + ($nickname == null ? 43 : $nickname.hashCode());
        Object $avatar = this.getAvatar();
        result = result * 59 + ($avatar == null ? 43 : $avatar.hashCode());
        Object $sku = this.getSku();
        result = result * 59 + ($sku == null ? 43 : $sku.hashCode());
        Object $cartInfo = this.getCartInfo();
        result = result * 59 + ($cartInfo == null ? 43 : $cartInfo.hashCode());
        return result;
    }

    public String toString() {
        return "StoreProductReplyQueryVo(id=" + this.getId() + ", productId=" + this.getProductId() + ", replyType=" + this.getReplyType() + ", productScore=" + this.getProductScore() + ", serviceScore=" + this.getServiceScore() + ", comment=" + this.getComment() + ", pics=" + Arrays.deepToString(this.getPics()) + ", pictures=" + this.getPictures() + ", picturesArr=" + Arrays.deepToString(this.getPicturesArr()) + ", merchantReplyContent=" + this.getMerchantReplyContent() + ", merchantReplyTime=" + this.getMerchantReplyTime() + ", createTime=" + this.getCreateTime() + ", star=" + this.getStar() + ", nickname=" + this.getNickname() + ", avatar=" + this.getAvatar() + ", sku=" + this.getSku() + ", cartInfo=" + this.getCartInfo() + ")";
    }
}
